<template>
  <div class="bg-white">
    <!-- 教程、添加到桌面、财务管理、入群、常见问题、联系客服、关于我们、隐私政策、用户协议 -->
    <!--    <van-notice-bar v-if="notice" :text="notice" left-icon="volume-o"></van-notice-bar> -->
    <!-- 重要的：财务管理 -->
    <u-cell-group>
      <u-cell v-for="(item, key) in cells" :key="key" :is-link="true" @click="onClick(item)">
        <template #title>
          <view class="flex items-center">
            <span class="m-r-1"><uni-icons :type="item.icon" :size="item.iconSize" :color="item.iconColor" /></span>
            <span class="custom-title">{{ item.title }}</span>
          </view>
        </template>
      </u-cell>
    </u-cell-group>
  </div>
</template>

<script>
export default {
  name: 'DkAppUserContent',
  props: {
    // 公告
    notice: { type: String, default: '' },
    // 用户菜单
    cells: { type: Array, default: () => [] },
  },
  data() {
    return {}
  },
  methods: {
    onClick(item) {
      console.log('item', item)
      if (item.type === 'path'){
        uni.navigateTo({
          url: item.path,
        })
      } else if (item.type === 'money'){
        uni.navigateTo({
          url: '/pages/user/fund',
        })
      }
    },
  },
}
</script>

<style scoped></style>
